<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Contatos</title>
<link href="css/geral.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="js/jquery.js" type="text/javascript"></script>
<script language="JavaScript" src="js/jquery_ui.js" type="text/javascript"></script>
<script language="JavaScript" src="js/biblioteca.js" type="text/javascript"></script>
<script>
$(function(){
	$("#fixo").html( $("#box_fixo").html() );
	var pos_fixo = $("#box_fixo").first().offset().top;
	
	$(window).scroll(function(){
		var scroll_pos = $(window).scrollTop();
		if(scroll_pos >= pos_fixo){
			$("#fixo").show();
		}else{
			$("#fixo").hide();
		}
	});
	
	var opts = {
	inline: true,
	firstDay: 1,
	showOtherMonths: true,
	
	dateFormat: 'dd/mm/yy',
    dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado'],
    //dayNamesMin: ['D','S','T','Q','Q','S','S','D'],
	dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb','Dom'],
    dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb','Dom'],
    monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
    monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'],
    nextText: 'Próximo',
    prevText: 'Anterior',
	
	beforeShowDay: calendario_marca,
	onSelect: calendario_ajax,
	onChangeMonthYear: calendario_change
	};
	
	$(".calendario").datepicker(opts);
	$(".calendario").bind("_adjustDate", function(){
		calendario_render();
	});
	//$(".calendario .ui-state-hover").removeClass("ui-state-hover").removeClass("ui-state-active");
});

function criar_lista(){
	bi.LightboxExibe({lightbox: "criar_lista"});
	return false;
}

var datas = [
	//{data: data_cria(22, 10, 2014), hora: "13:00:00", id: "2", status: "0", comunicado: "Comunicado Vip"}
	{data: data_cria(10, 10, 2014)},
	{data: data_cria(11, 10, 2014)},
	{data: data_cria(22, 10, 2014)},
	{data: data_cria(31, 10, 2014)}
];

function data_cria(dd, mm, yyyy){
	var data, dia, mes, ano;
	data = new Date();
	data.setDate(dd);
	data.setMonth(mm-1);
	data.setFullYear(yyyy);
	data.setHours(0,0,0,0);
	
	return data;
}

function calendario_marca(date){
	for (var a=0; a<datas.length; a++) {
		if(date.getTime() == datas[a].data.getTime()){
			return [true, "destaque", datas[a].comunicado];
		}
	}
	return [true, "ui-datepicker-unselectable ui-state-disabled"];
}

function calendario_ajax(date, inst){
	//console.log(date);
}

function calendario_change(year, month, inst){
	//calendario_render();
}

function calendario_render(){
	console.log("entrei");
	$(".calendario .ui-state-active").removeClass("ui-state-active");
}
</script>
</head>

<body>

<!--Inicio [pag]-->
<div class="pag pag_home">
    
	<!--Inicio [pag_banner]-->
    <span class="pag_banner">
    	<span class="wrap">
        	<span class="titulo">Projeto Informativo</span>
        </span>
    </span>
    <!--Fim [pag_banner]-->

    <span id="fixo" class="normal fixed" style="display: none; z-index: 11;"></span>
    
    <!--Inicio [pag_fixo]-->
    <span class="normal" id="box_fixo">
    
        <!--Inicio [pag_usuario]-->
        <span class="pag_usuario">
            <span class="wrap">
                <span class="logo"><img src="imgs/logo_tim.png" /></span>
                <span class="grupo">
                    <span class="nome"><h2>rubia@timbrasil.com.br</h2></span>
                    <a href="#" class="sair ico"><span class="logout"></span><span class="txt">Sair</span></a>
                </span>
            </span>
        </span>
        <!--Fim [pag_usuario]-->
        
        <!--Inicio [pag_menu]-->
        <span class="pag_menu">
            <span class="wrap">
                <ul>
                    <li><a href="home.html" class="sel">Home</a></li>
                    <li><a href="contatos.html">Contatos</a></li>
                    <li><a href="campanhas.html">Campanhas</a></li>
                    <li><a href="comunicados.html">Comunicados</a></li>
                    <li><a href="templates.html">Templates</a></li>
                    <!--<li><a href="#">Relatórios</a></li>-->
                </ul>
            </span>
        </span>
        <!--Fim [pag_menu]-->
    
    </span>
    <!--Fim [pag_fixo]-->
        
    <br />
    
    <!--Inicio [pag_body]-->
    <span class="pag_body">
    	<span class="wrap">
    		<span class="titulo">
            	<span class="ball"><span class="home"></span></span>
                <h1>Home</h1>
            </span>
		</span>
	</span>
    <!--Fim [pag_body]-->
    
    <!--Inicio [pag_body]-->
    <!--<span class="pag_body">
    	<span class="wrap">

            <span class="grafico">
                <span class="quad quad_contato" onclick="window.location='contatos.html'">
                    <span class="lbl"><span class="contatos"></span></span>
                    <span class="txt"><h3>Criar contatos</h3></span>
                </span>

                <span class="quad quad_campanha" onclick="window.location='campanhas.html'">
                    <span class="lbl"><span class="campanhas"></span></span>
                    <span class="txt"><h3>Criar campanha</h3></span>
                </span>
                
                <span class="quad quad_comunicado" onclick="window.location='comunicados.html'">
                    <span class="lbl"><span class="comunicados"></span></span>
                    <span class="txt"><h3>Criar comunicado</h3></span>
                </span>
                
                <span class="quad quad_template" onclick="window.location='templates.html'">
                    <span class="lbl"><span class="templates"></span></span>
                    <span class="txt"><h3>Criar template</h3></span>
                </span>
            </span>
                    
		</span>
	</span>-->
    <!--Fim [pag_body]-->

    <!--Inicio [pag_body]-->
    <span class="pag_body">
    	<span class="wrap">
        	<span class="subtitulo"><h2>Agenda comunicados:</h2></span>
            <span class="hr"></span>
            <br />
            <span class="grupo">
            	<span class="calendario"></span>
                
                
                <span class="ib" style="width: 650px; margin-left: 30px;">
                    <span class="subtitulo"><h2>Lista comunicados:</h2></span>
                    <span class="hr"></span>
                    
                    <br />
                
                    <span class="frame" style="width: 650px; height: 300px;">
                    <table class="tabela" border="0" cellpadding="0" cellspacing="0" style="width: 632px;">
                        <tr class="head">
                            <td><h3>Comunicado</h3></td>
                            <td width="10%"><h3>Hora</h3></td>
                            <td width="10%"><h3>Status</h3></td>
                            <td width="10%"><h3>Ação</h3></td>
                        </tr>
                        <tr>
                            <td><h3>Comunicado Vip</h3></td>
                            <td><h3>13:00:00</h3></td>
                            <td><h3>Enviado</h3></td>
                            <td><a href="#" class="botao ico" title="Relatório"><span class="relatorios"></span></a></td>
                        </tr>
                        <tr>
                            <td><h3>Comunicado Vip Natal</h3></td>
                            <td><h3>08:20:00</h3></td>
                            <td><h3>Aguardando envio</h3></td>
                            <td><a href="#" class="botao ico" title="Cancelar"><span class="del"></span></a></td>
                        </tr>
                        <tr>
                            <td><h3>Nono onono nononono onono oooono nonono onononono noonon nono nononoon onoonon nononon ononon</h3></td>
                            <td><h3>08:20:00</h3></td>
                            <td><h3>Rascunho</h3></td>
                            <td><a href="#" class="botao ico" title="Editar"><span class="edit"></span></a></td>
                        </tr>
                    </table>
                    </span>               
                
                </span>
                
            </span>
		</span>
	</span>
    <!--Fim [pag_body]-->
    
    <!--Inicio [pag_body]-->
    <span class="pag_body">
    	<span class="wrap">
        	<span class="subtitulo"><h2>5 próximos comunicados a enviar:</h2></span>
            <span class="hr"></span>
            <br />
            <table class="tabela" border="0" cellspacing="0" cellpadding="0">
            	<tr class="head">
                	<td><h3>Comunicado</h3></td>
                    <td width="20%"><h3>Data agendada</h3></td>
                    <td width="10%"><h3>Ação</h3></td>
                </tr>
                <tr>
                	<td><h3>Comunicado Quinta</h3></td>
                    <td><h3>30/10/2014 13:00:00</h3></td>
                    <td><a href="#" class="botao ico" title="Cancelar"><span class="del"></span></a></td>
                </tr>
                <tr>
                	<td><h3>Comunicado Sexta</h3></td>
                    <td><h3>30/10/2014 13:00:00</h3></td>
                    <td><a href="#" class="botao ico" title="Cancelar"><span class="del"></span></a></td>
                </tr>
            </table>
		</span>
	</span>
    <!--Fim [pag_body]-->

    <!--Inicio [pag_body]-->
    <span class="pag_body">
    	<span class="wrap">
        	<span class="subtitulo"><h2>5 últimos comunicados enviados:</h2></span>
            <span class="hr"></span>
            <br />
            <table class="tabela" border="0" cellspacing="0" cellpadding="0">
            	<tr class="head">
                	<td><h3>Comunicado</h3></td>
                    <td width="20%"><h3>Data agendada</h3></td>
                    <td width="10%"><h3>Ação</h3></td>
                </tr>
                <tr>
                	<td><h3>Comunicado vip</h3></td>
                    <td><h3>19/10/2014 13:00:00</h3></td>
                    <td><a href="#" class="botao ico" title="Relatório"><span class="relatorios"></span></a></td>
                </tr>
                <tr>
                	<td><h3>Comunicado de teste</h3></td>
                    <td><h3>10/09/2014 12:30:00</h3></td>
                    <td><a href="#" class="botao ico" title="Relatório"><span class="relatorios"></span></a></td>
                </tr>
            </table>
		</span>
	</span>
    <!--Fim [pag_body]-->

    <!--Inicio [pag_foot]-->
    <!--<div class="pag_foot">
    	<span class="wrap">
    		<a href="#">Algum link</a>
            <a href="#">Outra informação</a>
        </span>
    </div>-->
    <!--Fim [pag_foot]-->
</div>
<!--Fim [pag]-->

</body>

</html>